import { request } from '@/utils/request';

export const listGoodsCategory = () => {
  return request({
    url: '/app/goods/goodsCategory/list',
    method: 'get',
  });
};

export const listGoods = (pageNum, goodsCategoryId, goodsName) => {
  return request({
    url: '/app/goods/goods/list',
    method: 'get',
    query: {
      pageNum,
      pageSize: 20,
      goodsCategoryId,
      goodsName,
    },
  });
};

export const getGoods = (goodsId) => {
  return request({
    url: '/app/goods/goods/' + goodsId,
    method: 'get',
  });
};
